#pragma  once
#include "../util/util.h"
#include "../include/platform.h"

using namespace soy;

class WndUtil {
public:
	WndUtil(HWND w = 0);
	virtual ~WndUtil() {
	}
public:
	Rect getWindowRect();
	Rect getClientRect();
	BOOL showWindow(int cmdShow);
	BOOL updateWindow();
	HWND setFocus();
	BOOL destroyWindow();
	BOOL moveWindow(int x, int y, int w, int h, BOOL repaint);
	void fillParentClientArea();
	BOOL isPopup();
	HWND getParentWindow();
	BOOL setMenu(HMENU menu);
	HMENU getMenu();
	//Send WM_CLOSE, not Minimize Window -- API ::CloseWindow(...) will Minimize Window
	void closeWindow();
	HINSTANCE getInstance();
	HRESULT sendMessage(UINT msg, DWORD wParam, DWORD lParam);
	HRESULT postMessage(UINT msg, DWORD wParam, DWORD lParam);

public:
	virtual HWND getWnd();
	virtual void setWnd(HWND hwnd);
	virtual operator HWND();
	virtual void operator=(HWND w);
private:
	HWND m_Wnd;
};

